//Accepted
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <cmath>
#include <queue>
#include <map>
#include <iostream>
#include <list>
#include <deque>
#include <cstdio>
#include <cstring>

#include <cstdlib>
using namespace std;

int main (){
	//freopen("in.txt", "r", stdin);//freopen("out.txt", "w", stdout);
	int n, m, i, j, sum=0, a[100], x, y;
	memset(a, 0, sizeof(a));
	scanf("%d%d", &n, &m);
	for(i=0;i<n;++i){
		y=0;
		for(j=0;j<m;++j){
			scanf("%d", &x);
			y+=x;
			a[j]+=x;
		}
		if(y>sum)sum=y;
	}
	for(i=0;i<m;++i)if(a[i]>sum)sum=a[i];
	
	printf("%d", sum);
	
	return 0;
}
